<?php

/**
 * Subclass for representing a row from the 'calories' table.
 *
 * 
 *
 * @package lib.model
 */ 
class Calories extends BaseCalories
{
	public function hydrate(ResultSet $rs, $startcol = 1)
	{
		$this->setCulture(sfContext::getInstance()->getUser()->getCulture());
		parent::hydrate($rs, $startcol);
	}

    public function getCategory() 
    {
        $category = CaloriescatPeer::retrieveByPk($this->getCatId());
        if( $category ) 
        {
            return $category->getName();
        }
        else
        {
            return "-";
        }
    }
}
